package com.example.whatrubbish.mapper;

import com.example.whatrubbish.model.Rubbish;
import com.example.whatrubbish.vo.Criteria;
import com.example.whatrubbish.vo.RubbishWithSort;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component("RubbishMapper")
public interface RubbishMapper {
    List<RubbishWithSort> selectByName(RubbishWithSort record);

    Long selectCountBySortId(Criteria criteria);

    List<RubbishWithSort> selectBySortId(Criteria criteria);

    List<Rubbish> selectRecommend();

    List<Map<String, Object>> selectRubbishDistribute();

    int deleteByPrimaryKey(Long id);

    int recoverByPrimaryKey(Long id);

    int updateByPrimaryKey(Rubbish record);

    int deleteByList(List<RubbishWithSort> list);

    int insert(Rubbish record);

    int insertSelective(Rubbish record);

    Rubbish selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Rubbish record);
}